The present invention relates to a method for providing a master-slave hot-swapping apparatus and mechanism on a mono-ATA (Advanced Technology Attachment) bus. Particularly, a new design for avoiding data confusion caused by cutting off the power supply of master and slave hot-swapping devices, then carrying out a hot-swapping process, reconnecting, and restarting. The new design can overcome problems in swapping.
The ATA specification is a defined industry standard for ANSI (American National Standards Institute), NCITS (National Committee for Information Technology Standards), and Technical Committee T13 to develop and maintain IDE (Integrated Drive Electronics) hard-disk machines (IDE hard-disk machines are extensively used in PC systems), CD-ROM drives or other ATA/ATAPI devices. The latest specification is ATA/ATA-6, which has defined a set of registers for communication between a host system and its related devices. These related devices are able to complete specifically assigned commands, and can adapt with controlling process and signals as well as transfer protocols. This specification is a regulation for serving the said devices to connect with ATA buses for keeping the devices in normal operation.
Generally speaking, as shown in FIG. 1, an ATA bus (10) has three connectors (11), one to connect to the host system while the other two connect with the master-slave ATA devices (12, 13) through bus separators (14). Therefore, a single or mono-master device (12), a single or mono-slave device (13), or a pair of master and slave devices (12, 13) are allowed to be connected with the ATA bus (10). For a reduction of complexity in the host controller as well as in IDE hard-disk PC machines, a pair of master-slave devices (12,13) can be used with the ATA bus (10). One of the advantages is that the master device (12) and the slave device (13) are entirely controlled by the same bus controller (20) (as shown in drawing 2). Therefore, a lessened number of components can be used in the bus controller (20) to decrease the costs.
When the power supply been switched on, every individual ATA device will self diagnose and, upon completion of the diagnosis, a slave device will report whether its state is normal or not to the master device (12) by emission of signals. If the result of self-diagnosis is normal, a signal will be reported by PDIAG that is at logic xe2x80x9c0xe2x80x9d potential (namely, at ground potential). Oppositely, if the report is logic xe2x80x9c1xe2x80x9d potential, this means the self-diagnosis is abnormal. If the host system desires to search the state of the slave device (13), the slave device (13) may be abnormal ornon-existent. Under this situation, the master device (12) must play a role as the slave device (13) and respond to the searching-state for the slave device (13) to the host system.
Hot-swapping can be used in disk arrays or relevant applications fields, in repairing the troubled disk machine(s) so that the power supply of the host system can be still in a power on state, in which the capacities of data processing and the system""s stability must be increasing. But, in general, in order for making no damage to the system and its devices under general circumstances, system managers will separate the troubled disk machine(s) from the ATA bus (10) and then take out the troubled disk machine from the system by cut off the power supply. After replacing a disk machine for trouble-shooting, the power supply to the system is turned on again for working. As an example, suppose that a pair of master-slave devices (12,13) are operating on the mono-ATA bus (10), when the master device (12) malfunctions. The power supply is cut off, then the device is shifted out and a new device is reconnected. But the power supply of slave device (13) is still on, so the device (13) will not enter into the mode of self-diagnosis and no result of self-diagnosis will be reported to the master device (12) via PDIAG""s signals. Under this circumstance, the just restarted master device (12) must misjudge that the slave device (13) is in a dysfunctional state. Then, as the host system tries to search the state of the slave device (13), the master device (12) will rule and follow the specification of ATA for operating and will play a role as the slave device (13). As a result, the master device (12) and slave device (13) will simultaneous respond to the data on ATA bus (10), which causes data confusion for the host system. So, an adaptable way of hot swapping the master device (12) and slave device (13) on the mono-ATA bus (10) would be desirable.
Accordingly, a chiefly object of the invention is to provide a method of master-slave hot-swapping-onto an ATA bus, and,means for solving the above mentioned defects of master-slave hot-swapping apparatus in searching error data by the said process of hot swapping.
Accordingly, the invention chiefly consists of a bus controller and a bus separator for isolating the signals coming from the hot swapping in processing by the hot swapping apparatus and the host system. A power supply switch is provided for cutting off the power supply. A logic xe2x80x9c0xe2x80x9d unit is provided for generating a logic xe2x80x9c0xe2x80x9d potential with respect to PDIAG""s signal of the ATA device, upon completion of the process of hot swapping while the system is restarting. Restated, the feature of the invention is that any power supply of the master-slave hot-swapping device is cut off and the process of hot swapping is carried out, a new device is reconnected and restarted, and the master device will report to the host system that the slave device is in a normal condition. Thus, in the process of hot swapping, the master and slave device will not simultaneously respond with data on the ATA bus, and confused data can be avoided.
The logic xe2x80x9c0xe2x80x9d unit is resistor with a grounded connection to form a logic xe2x80x9c0xe2x80x9d with respect to PDIAG""s signal for transfer onto the ATA bus. Therefore, extra costs can be avoided and the electric circuits can be simplified.
These objects, the structural design and technical method of the present invention will become apparent and further understood when reference is had to the accompanying drawings and detailed description.